﻿#ifndef DESCRIPTION_H
#define DESCRIPTION_H

#include <QObject>
#include <QXmlStreamWriter>
#include "device.h"
#include "step.h"
#include "objectfactory.h"

class Description : public QObject
{
    Q_OBJECT
public:
    Description();

private:
    QList<Device*>          m_pDevices;
    QList<Step*>            m_pSteps;

public:
    Device* FindDeviceById(QString strID);

public:
    void AddDevice(Device* pDevice){
        m_pDevices.append(pDevice);
    }

    void AddStep(Step* pStep){
        m_pSteps.append(pStep);
    }

public:
    bool writeXML(const QString& filePath);
    bool ReadXML(const QString& filePath);

    void run();
};

#endif // DESCRIPTION_H
